/* eslint-disable @typescript-eslint/no-empty-object-type */

// import axios from 'axios';
import { requestClient } from '#/api/request';

export namespace IpqcApi {
  export interface IpqcListParams {
    pageNum: number;
    pageSize: number;
  }
  export interface Params {}
  export interface Row {
    searchValue: null;
    createBy: string;
    createTime: string;
    updateBy: string;
    updateTime: null | string;
    remark: string;
    params: Params;
    ipqcId: number;
    ipqcCode: string;
    ipqcName: null | string;
    ipqcType: string;
    templateId: number;
    sourceDocId: number;
    sourceDocType: string;
    sourceDocCode: string;
    sourceLineId: number;
    workorderId: number;
    workorderCode: string;
    workorderName: string;
    taskId: number;
    taskCode: string;
    taskName: null;
    workstationId: number;
    workstationCode: string;
    workstationName: string;
    processId: number;
    processCode: string;
    processName: string;
    itemId: number;
    itemCode: string;
    itemName: string;
    specification: string;
    unitOfMeasure: string;
    unitName: string;
    quantityCheck: number;
    quantityUnqualified: number;
    quantityQualified: number;
    crRate: number;
    majRate: number;
    minRate: number;
    crQuantity: number;
    majQuantity: number;
    minQuantity: number;
    checkResult: string;
    inspectDate: string;
    inspector: null;
    status: string;
    attr1: null;
    attr2: null;
    attr3: number;
    attr4: number;
  }
  export interface IpqcListResult {
    total: number;
    rows: Row[];
    code: number;
    msg: string;
  }
}

// 获取过程检验列表
export const getIpqcList = (data: IpqcApi.IpqcListParams) => {
  return requestClient.get<IpqcApi.IpqcListResult>('/mes/qc/ipqc/list', {
    params: data,
  });
};
